#include "stdafx.h"
#include "ZMessageBuilder.h"
#include "ZNetworkGenericMessage.h"

namespace	Z	{

//------------------------------------------------------------------------------------------------------------------------
NetworkGenericMessage* MessageBuilder::build(void* data, size_t kSize, NetworkId kNetworkId)
{
	NetworkGenericMessage* pMessage	= new NetworkGenericMessage(kNetworkId, sizeof(kSize) + kSize);
	pMessage->write(&kSize, sizeof(kSize));
	pMessage->write(data, kSize);
	return pMessage;
}

}